package com.siddy.bbs;

import java.util.logging.Level;
import java.util.logging.Logger;

import android.app.Application;

import com.android.volley.toolbox.Volley;
import com.siddy.bbs.util.SharedPreferenceManager;

public class SiddyApplication extends Application {

	private SharedPreferenceManager spf;
	
	private volatile boolean logined;

	private volatile User mUser;
	
	
	@Override
	public void onCreate() {
		super.onCreate();
		spf = SharedPreferenceManager.init(this);
		Logger.getLogger(Volley.class.getName()).setLevel(Level.CONFIG);
	}

	@Override
	public void onTerminate() {
		super.onTerminate();
	}

	@Override
	public void onLowMemory() {
		super.onLowMemory();
	}

	public SharedPreferenceManager getSpfManager() {
		return spf;
	}
	
	public boolean isLogined() {
		return logined;
	}

	public void setLogined(boolean logined) {
		this.logined = logined;
	}

	public void setUser(User user) {
		mUser = user;
	}

	public User getUser() {
		return mUser;
	}

}
